package o;

import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;

public class eha {
    protected Handler ˊ;
    private c ˋ;

    public eha(Handler handler, c cVar) {
        this.ˋ = cVar;
        this.ˊ = handler;
    }

    public void ˏ() {
        if (azc.ˎ().ॱ() >= 21 && eqh.ˎ().ˏ()) {
            dmq.ˏ.ॱ(new dmi(this) {
                final /* synthetic */ eha ॱ;

                {
                    this.ॱ = r1;
                }

                public void run() {
                    final boolean ॱ = this.ॱ.ˎ();
                    this.ॱ.ˊ.post(new Runnable(this) {
                        final /* synthetic */ AnonymousClass2 ˎ;

                        public void run() {
                            if (this.ˎ.ॱ.ˋ != null) {
                                this.ˎ.ॱ.ˋ.ˊ(ॱ);
                            }
                        }
                    });
                }
            });
        } else if (this.ˋ != null) {
            this.ˋ.ˊ(false);
        }
    }

    public void ॱ() {
        this.ˋ = null;
    }

    private boolean ˎ() {
        boolean z = false;
        String str = "isSupportAppRating";
        try {
            Bundle call = ContentManager.getInstant().getContext().getContentResolver().call(Uri.parse("content://com.huawei.parentcontrol"), str, null, null);
            if (call != null) {
                z = call.getBoolean("parentcontrol_issupport_apprating", false);
            }
        } catch (IllegalArgumentException e) {
            Logger.ˋ("GetParentControlSupportStatusTask", "getParentControlSupport error:" + e.getMessage());
        } catch (Exception e2) {
            Logger.ˋ("GetParentControlSupportStatusTask", e2.getMessage());
        }
        return z;
    }
}
